function ccR_Use_Mana_Potions()
	-- Class compatability check
	if (ccrPlayerClass() == "Druid" and (ccrPlayerSpec() == 1 or ccrPlayerSpec() == 4))
	or ccrPlayerClass() == "Mage"
	or ccrPlayerClass() == "Warlock"
	or ccrPlayerClass() == "Priest"
	or ccrPlayerClass() == "Shaman"
	or ccrPlayerClass() == "Paladin"
	or (ccrPlayerClass() == "Monk" and ccrPlayerSpec() == 2)
	then
		if ccrPlayerMana() <= ccRS.CF_Mana_PotionsMP then
			if vLastManaPotionAttempt == nil or (GetTime()-vLastManaPotionAttempt > 1) then
				for i=1, # ManaPotionList do
					if GetItemCount(ManaPotionList[i]) > 0
					and IsUsableItem(ManaPotionList[i]) == 1
					then
						UseItemByName(ManaPotionList[i])
						break
					end
				end
				vLastManaPotionAttempt = GetTime()
			end
		end
	end
end

ManaPotionList = {
	[1] = "Minor Mana Potion";
	[2] = "Lesser Mana Potion";
	[3] = "Mana Potion";
	[4] = "Superior Mana Potion";
	[5] = "Major Mana Potion";
	[6] = "Endless Mana Potion";
	[7] = "Mana Potion Injector";
	[8] = "Super Mana Potion";
	[9] = "Crystal Mana Potion";
	[10] = "Unstable Mana Potion";
	[11] = "Super Rejuvenation Potion";
	[12] = "Icy Mana Potion";
	[13] = "Runic Mana Injector";
	[14] = "Runic Mana Potion";
	[15] = "Mythical Mana Potion";
	[16] = "Master Mana Potion";
	[17] = "Alchemist's Rejuvenation";
	[18] = "Greater Mana Potion";
	[19] = "Mana Gem";
	[20] = "Master Mana Potion";
};